home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / mail-tools / thor / thor_2.22 / thor.lha / rexx / aminet.thor < prev    next >
Text File  |  1995-11-13  |  2KB  |  64 lines

  1. /*
  2.     $VER: 1.0 FTPget from Aminet mailing list - Patrick Delaere 
  3.     email Patrick.DeLaere@hookon.be
  4.     tested with FTPGet 1.2
  5.     Your have to change ftp site and LOCAL dir to your requirements at the end of te file
  6.     Please email sugestions and enhancements
  7. */
  8.  
  9. options results
  10. drop test. 
  11. drop text. 
  12. drop selected.
  13. amitcp = 1
  14. if ~show('l', 'rexxsupport.library') then do
  15.     check = addlib('rexxsupport.library',0,-30,0)
  16.     end
  17. if ~show('p', 'AMITCP') then do
  18.     amitcp = 0
  19.     REQUESTNOTIFY TEXT '"AmiTCP NOT running...So you are not able download"' BT '"_Go On!|_Cancel"'
  20.     if (result = 0) then exit
  21.     end
  22. if ~show('p', 'BBSREAD') then do
  23.     address command "run >nil: `Getenv THOR/THORPath`bin/LoadBBSREAD"
  24. end
  25. do while ~show('p', 'BBSREAD')
  26.     call delay(50)
  27.     end
  28.  
  29.  
  30. Currentmsg stem test 
  31. address BBSREAD READBRMESSAGE bbsname test.BBSNAME confname test.confname msgnr test.msgnr HEADSTEM Head TEXTSTEM text
  32. if index(head.subject,"Today's Aminet uploads") = 0 then do
  33.     REQUESTNOTIFY TEXT '"Not an Aminet upload list"' BT '"_OK"'
  34.     exit
  35.     end
  36. Requestlist instem text.text outstem selected MULTISELECT DRAGSELECT TITLE '"'Head.Subject'"'
  37. if (rc ~= 0) then exit
  38.  
  39. error = open('dwnlist','T:AminetFTP','w')
  40. do i = 1 to selected.count
  41.     x = left(selected.i , 1)
  42.     if verify(left(selected.i , 1),'| ', 'match') then iterate i
  43.     else do 
  44.         parse var selected.i file dir descrip
  45.         error = writeln('dwnlist', dir'/'file)
  46.     end
  47. end
  48. error = close('dwnlist')
  49.  
  50. if (amitcp=0) then do
  51.     REQUESTNOTIFY TEXT '"List for FTPGet written as T:AminetFTP"' BT '"_OK"'
  52.     exit
  53.     end
  54. else do
  55.     REQUESTNOTIFY TEXT '"Shall I Download from AMINET ?..."' BT '"_YES|_NO"'
  56.     if(result = 0) then exit
  57.     if(result = 1) then do
  58.         /* change ftp site and LOCAL dir to your requirements */
  59.         address command 'run amitcp:bin/ftpget ftp.uni-paderborn.de CWD pub/aminet LIST T:aminetFTP LOCAL DH5:Downl/ INFO'
  60.     end
  61. end
  62.  
  63. exit
  64.